home *** CD-ROM | disk | FTP | other *** search
- /****i* SOURCE_FILE/INFO
- *
- * NAME
- * ImageAttributes.js
- *
- * USAGE
- * Part of Netobjects JavaScript Library.
- *
- * COPYRIGHT
- * Copyright ⌐ 2000-2005 Website Pros, Inc.
- * All Rights Reserved.
- *
- * This is an unpublished work protected by Website Pros, Inc.
- * as a trade secret, and is not to be used or disclosed except as
- * expressly provided in a written license agreement executed by
- * you and Website Pros, Inc.
- *
- * <copyright@websitepros.com>
- *
- * NOTES
- * JavaScript code.
- *
- *****/
- if (!IS.isModuleInitialized("IS.NOF.ImageAttributes"))
- {
- /****h* NOF_JavaScript_Library/NOF.ImageAttributes
- *
- * NAME
- * NOF.ImageAttributes
- *
- * DESCRIPTION
- *
- * External dependencies: none
- ****/
-
- /**
- * Constructor
- **/
- function NOF_ImageAttributes() {
-
- this.__proto__ = NOF_ImageAttributes.prototype;
-
- this.flags = arguments.length > 0 ? arguments[0] : 0;
- this.width = arguments.length > 1 ? arguments[1] : 0;
- this.height = arguments.length > 2 ? arguments[2] : 0;
- this.quality = arguments.length > 3 ? arguments[3] : 0;
- this.format = arguments.length > 4 ? arguments[4] : 'JPEG';
- this.alt = arguments.length > 5 ? arguments[5] : '';
- this.isOriginalImage = arguments.length > 6 ? arguments[6] : 0;
- this.stretch = arguments.length > 7 ? arguments[7] : 1;
- }
- {
-
- var method = NOF_ImageAttributes.prototype;
-
- method.equal = function (o) {
- return ( this.flags == o.flags
- && this.width == o.width
- && this.height == o.height
- && this.quality == o.quality
- && this.format == o.format
- && this.alt == o.alt
- && this.isOriginalImage == o.isOriginalImage
- && this.stretch == o.stretch );
- }
-
- method.clone = function () {
- return new ImageAttributes(this.flags, this.width,
- this.height, this.quality, this.format, this.alt, this.isOriginalImage );
- }
-
- method.toString = function () {
- return ' flags = ' + this.flags +
- ', width = ' + this.width +
- ', height = ' + this.height +
- ', quality = ' + this.quality +
- ', format = ' + this.format +
- ', alt = ' + this.alt +
- ', isOriginalImage = ' + this.isOriginalImage +
- ', stretch = ' + this.stretch;
- }
-
- }
-
- NOF.__proto__.ImageAttributes = NOF_ImageAttributes;
- }
-